Skip to content

Conversation

eric642
Copy link
Contributor

@eric642 eric642 commented Sep 11, 2025

Fixes #3544

@eric642 eric642 changed the title Fix the additional message Fix(go) prompt.excute merge external incoming messages Sep 11, 2025
@@ -136,10 +136,15 @@ func (p *prompt) Execute(ctx context.Context, opts ...PromptExecuteOption) (*Mod

p.MessagesFn = mergeMessagesFn(p.MessagesFn, execOpts.MessagesFn)

input, err := buildVariables(execOpts.Input)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite see why this is necessary. Without this, we pipe through execOpts.Input to buildRequest() which does this as a first step.

@@ -136,10 +136,15 @@ func (p *prompt) Execute(ctx context.Context, opts ...PromptExecuteOption) (*Mod

p.MessagesFn = mergeMessagesFn(p.MessagesFn, execOpts.MessagesFn)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to delete this line since it'll double up the messages from the prompt when we render the messages at the bottom.

@apascal07
Copy link
Collaborator

Fix here: #3565

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Go]prompt.excute did not handle the additional message
2 participants